cmake_minimum_required(VERSION 3.22.1)

project("ffmpeg_simple02")

#添加头文件路径（相对于本文件路径）
include_directories(include)

find_library(
        log-lib
        log)

#设置环境变量         结合include_directories(include)，最后在target_link_libraries中添加静态库或动态库的名字，就可以实现引入第三方静态库或动态库
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_SOURCE_DIR}/libs/${ANDROID_ABI}")

add_library(${CMAKE_PROJECT_NAME} SHARED
        native-lib.cpp
)

target_link_libraries(${CMAKE_PROJECT_NAME}
        avcodec
        avformat
        avfilter
        avutil
        swresample
        swscale
        android
        OpenSLES
        GLESv2
        EGL
        log)